<h1>Listing messages</h1>

<table>
  <tr>
    <th>Employee</th>
    <th>Message</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @messages.each do |message| %>
  <tr>
    <td><%= message.employee_id %></td>
    <td><%= message.message %></td>
    <td><%= link_to 'Show', employee_message_path(@employee, message) %></td>
    <td><%= link_to 'Edit', edit_employee_message_path(@employee, message) %></td>
    <td><%= link_to 'Destroy', employee_message_path(@employee, message), method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Message', new_employee_message_path(@employee) %>
